<template>
  <el-container>
    <el-aside>
      <el-menu :router="true" :default-active="$route.name">
        <template v-for="route in $router.options.routes">
          <template v-if="isRoute(route)">
            <el-menu-item :index="route.name">{{route.name}}</el-menu-item>
          </template>
        </template>
      </el-menu>
    </el-aside>
    <el-main>
      <router-view></router-view>
    </el-main>
  </el-container>
</template>

<script>
  export default {
    name: 'experiments',

    methods: {
      isRoute (route) {
        return typeof route.name === 'string';
      }
    },
  }
</script>
